<?
	session_start();
	if ($_SESSION['id'] == "") {
	?>
		<script>
			alert('Need to login!');
			document.location.href='log.php';
		</script>
	<?
		exit(1);
	}

?>
